package ren.kane.phoenix.design.filter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author renrk(1275) on 2018-10-28 4:37 PM
 **/
public class CriteriaSingle implements Criteria {

    @Override
    public List<Person> meetCriteria(List<Person> personList) {
        List<Person> singlePersons = new ArrayList<>();
        for (Person person : personList) {
            if (person.getGender().equalsIgnoreCase("single")) {
                singlePersons.add(person);
            }
        }
        return singlePersons;
    }
}
